<html lang="en">
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
<title>{$region['title']}</title>
<link rel="stylesheet" type="text/css" href="{MODULE_URL}template/mobile/style/style1/static/css/home.css" />
<link rel="stylesheet" type="text/css" href="{MODULE_URL}template/mobile/style/style1/static/css/style.css" />
<!--组件依赖js begin-->
    <script type="text/javascript" src="{MODULE_URL}template/mobile/style/style1/static/js/zepto.js"></script>
    <script type="text/javascript" src="{MODULE_URL}template/mobile/style/style1/static/js/zepto.extend.js"></script>
    <script type="text/javascript" src="{MODULE_URL}template/mobile/style/style1/static/js/zepto.ui.js"></script>
    <script type="text/javascript" src="{MODULE_URL}template/mobile/style/style1/static/js/zepto.fix.js"></script>
    <!--刷新-->
    <script type="text/javascript" src="{MODULE_URL}template/mobile/style/style1/static/js/refresh.js"></script>


<body>
    <div id='slider' class='swipe'>
        <div class='swipe-wrap'>
            {loop $slides $row}
            <div class='wrap'>
                <a href="{$row['url']}">
                    <img src="{$_W['attachurl']}{$row['thumb']}" alt="{$row['title']}" style="width:100%;" width='100%' height='160px' />
                </a>
            </div>
            {/loop}
        </div>
    </div>
    <div style="height:10px;width:100%"></div>
    <!-- <section class="floor discount-floor">
        <div class="border-t"></div>
        <ul>
            <li onclick="#" class="border-r"><img src="{MODULE_URL}template/mobile/style/style1/static/image/active1.jpg"></li>
            <li onclick="#"><img src="{MODULE_URL}template/mobile/style/style1/static/image/active2.jpg"></li>
        </ul>
        <div class="border-b"></div>
    </section> -->
    <section class="floor">
        <div class="border-t"></div>
        <h2 class="floor-title co-yellow" style="line-height:12px;">{$menu['title']}<i></i><span onclick="javascript:window.location.href='{php echo $this->createMobileUrl('nav')}';">所有服务</span></h2>
        <div class="border-b" style="top:44px"></div>
        <ul class="floor-menu-1" style="margin-top:5px;">
        {loop $navs $nav}
        <li onclick="javascript:window.location.href='{$nav['url']}'"><img src="{php echo tomedia($nav['thumb'])}" style="width:39px;height:39px;">
                <div>{$nav['title']}</div>
            </li>


        {/loop}
        </ul>
        <div class="border-b"></div>
    </section>
    <section class="floor channel-floor">
        <div class="border-t"></div>
        <h2 class="floor-title-2">猜您喜欢</h2>
        <div class="border-b" style="top:43px"></div>
        <div id="showGoods">
            <ul class="channel-floor-ul floor-two-ul">
            </ul>
        </div>
        <br>
    </section>
    <!--猜您喜欢 e-->
    <!--加载更多 s-->
    <section class="floor" style=" text-align:center; padding:16px 0; font-size:16px;" onclick="javascript:window.location.href='{php echo $this->createMobileUrl('shopping',array('op' => 'list'))}';">
        查看全部商品
    </section>
   
    <!--加载更多 e-->
    <div style="height:5em;"></div>

    <!-- 底部 -->
     {template 'style/style1/footer'}
     <a href="javascript:window.location.href='{php echo $this->createMobileUrl('shopping',array('op' => 'mycart'))}';" class="footer-car" id="counts" style="display: inline;"><span>{$carttotal}</span></a>
    <script type="text/javascript" src="{MODULE_URL}template/mobile/style/style1/static/js/swipe.js"></script>
    <script>
    $(function() {
        new Swipe($('#slider')[0], {
            speed: 500,
            auto: 3000,
            callback: function() {
                var lis = $(this.element).next("ol").children();
                lis.removeClass("on").eq(this.index).addClass("on");
            }
        });
    });
    $(function() {
        select('a1');
    });
    </script>

    <script>
     /*ajax请求函数,判断共几页，呈现不同效果*/
    (function() {
         xqAjax();
            function xqAjax() {
                var url = "{php echo $this->createMobileUrl('home')}";
                $.ajax({
                    url: url,
                    async: false,
                    type: 'post',
                    dataType: 'json',
                    data: {
                        
                    },
                    beforeSend: function() {
                        
                    },
                    success: function(data) {
                        var $list = $('.floor-two-ul'),
                            html = (function(data) { //数据渲染
                                var liArr = [];
                                $.each(data.allhtml, function() {
                                    liArr.push(this.html);
                                });
                                return liArr.join('');
                            })(data);

                        $('.floor-two-ul').html(html)
                        if (data.page_count < 2) {
                            $(".ui-refresh-down").html("<span class='ui-refresh-label'>没有更多内容了</span>");
                        }
                    }
                    // ,
                    // error: function() {
                    //     alert('请求不到数据，请重新搜索！');
                    // }

                })
            }

           
        })();
    </script>
</body>

</html>
